import React,{Component} from 'react';

import KanbanBoard from './KanbanBoard';

import Search from './Search'

import Greeter from './Greeter'

class Hello extends Component{
    render(){

        let divStyle = {
            width:100,
            height:30,
            padding:5,
            backgroundColor:'#ee9900'
        };

        return <div style={divStyle}>Hello World</div>
    }
}

class GroceryList extends Component{
    render(){
        return(
            <ul>
                <ListItem quantity="1">Bread</ListItem>
                <ListItem quantity="6">Eggs</ListItem>
                <ListItem quantity="2">Milk</ListItem>
            </ul>
        )
    }
}

class ListItem extends Component{
    render(){
        return(
            <li>{this.props.quantity} x {this.props.children}</li>
        );
    }
}

let cardList = [
    {
        id:1,
        title:"Read the Book",
        description:"I should read the **whole** book",
        color:'#BD8D31',
        status:"in-progress",
        tasks:[]
    },
    {
        id:2,
        title:"Write some code",
        description:"Code along with the samples in the book.The complete source can be found at [github](https://github.com/pro-react)",
        color:'#3A7E28',
        status:"todo",
        tasks:[
            {
                id:1,
                name:"ContactList Example",
                done:true
            },
            {
                id:2,
                name:"Kanban Example",
                done:false
            },
            {
                id:3,
                name:"My own experiments",
                done:false
            }
        ]
    }
];

React.render(<KanbanBoard cards={cardList}/>,document.getElementById('root'));
// React.render(<Greeter salutation="替换默认值"/>,document.getElementById('root'));